package encapsulation;

import java.util.Scanner;

/**
 * @classname:MemberTest
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 11:09
 * @version: 0.1
 * @since:1.8
 */
public class MemberTest {
    public static void main(String[] args) {
        Member mb = new Member();
        Scanner input = new Scanner(System.in);
        System.out.println("请输入会员号");
        int number = input.nextInt();

        if(mb.register(number)!=1){
            System.out.println("请输入会员姓名");
            String name = input.next();
            mb.setName(name);
            System.out.println("请输入积分");
            int integral = input.nextInt();
            mb.setIntegral(integral);
            System.out.println(mb.discount());
            if(mb.isLucy()){
                System.out.println("恭喜你中奖了");
            }else{
                System.out.println("没中奖");
            }

        }


    }
}
